Skip to content

Move to prek and pymarkdown#432

Merged
bouwew merged 2 commits intomainfrom
prek
Mar 27, 2026
Merged

Move to prek and pymarkdown#432
bouwew merged 2 commits intomainfrom
prek

Conversation

@CoMPaTech
Copy link
Copy Markdown
Member

@CoMPaTech CoMPaTech commented Mar 27, 2026

Summary by CodeRabbit

  • Chores
    • Optimized CI/CD pipeline configurations for improved build efficiency
    • Transitioned to alternative code quality verification tools
    • Enhanced pre-commit hook management process
    • Updated build environment settings and dependency specifications
    • Refined development environment setup automation

@CoMPaTech CoMPaTech requested a review from a team as a code owner March 27, 2026 10:42
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

Warning

Rate limit exceeded

@CoMPaTech has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 7 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 19 minutes and 7 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4841cc83-7aa1-464f-b530-a919e1c12f60

📥 Commits

Reviewing files that changed from the base of the PR and between 3367092 and f48b9ce.

📒 Files selected for processing (1)
  • .github/workflows/verify.yml
📝 Walkthrough

Walkthrough

This PR migrates the project from the pre-commit tool to prek for managing Git hooks and pre-commit operations. Additionally, it replaces the markdownlint-cli markdown linter with pymarkdown. Configuration files, workflows, and build scripts are updated to reflect these tool changes.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/merge.yml, .github/workflows/verify.yml
Updated cache versioning (CACHE_VERSION changes). Replaced precommit-home inputs with prek-home and changed pre-commit commands to prek run. Updated mypy job to use uv pip list instead of pip list. Switched markdown linting from markdownlint to pymarkdown hook.
Pre-commit and Linting Configuration
.pre-commit-config.yaml, .markdownlint.yaml, .pymarkdown
Replaced markdownlint-cli pre-commit hook with pymarkdown (v0.9.36). Removed MD013 rule disablement from .markdownlint.yaml. Added new .pymarkdown configuration file to disable md013 plugin.
Dependencies
requirements_commit.txt
Replaced pre-commit dependency with prek.
Setup and Test Scripts
scripts/setup.sh, scripts/setup_test.sh, scripts/tests_and_coverage.sh
Replaced pre-commit install commands with prek install --install-hooks across all scripts to use the new hook management tool.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested labels

github-actions, dependencies

Suggested reviewers

  • bouwew
  • dirixmjm
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately and concisely summarizes the main changes: migrating from pre-commit to prek and switching the markdown linter from markdownlint-cli to pymarkdown.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch prek

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot requested review from bouwew and dirixmjm March 27, 2026 10:42
@coderabbitai coderabbitai bot added dependencies Pull requests that update a dependency file github-actions Pull requests that update Github_actions code labels Mar 27, 2026
@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.76%. Comparing base (ca597df) to head (f48b9ce).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #432   +/-   ##
=======================================
  Coverage   81.76%   81.76%           
=======================================
  Files          36       36           
  Lines        8195     8195           
=======================================
  Hits         6701     6701           
  Misses       1494     1494           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/verify.yml (1)

114-124: ⚠️ Potential issue | 🔴 Critical

Inconsistent command usage: prek run vs pre-commit run.

Line 115 correctly uses prek run for the pylint hook, but line 124 still uses pre-commit run for the pymarkdown hook. This inconsistency may cause failures if pre-commit is no longer installed in the environment.

🐛 Proposed fix to use prek consistently
       - name: Lint markdown files
         run: |
           . venv-${{ needs.cache.outputs.python-version }}/bin/activate
-          pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual pymarkdown
+          prek run --show-diff-on-failure --color=always --all-files --hook-stage manual pymarkdown
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/verify.yml around lines 114 - 124, The "Lint markdown
files" job uses pre-commit directly while the "pylint" job uses prek; update the
Lint markdown files step to run the pymarkdown hook via prek for consistency:
replace the `pre-commit run --show-diff-on-failure --color=always --all-files
--hook-stage manual pymarkdown` invocation in the "Lint markdown files" step
with the equivalent `prek run --show-diff-on-failure --color=always --all-files
--hook-stage manual pymarkdown` so both hooks use prek (matching the pylint
step).
🧹 Nitpick comments (1)
.github/workflows/merge.yml (1)

6-8: CACHE_VERSION mismatch with verify.yml and appears unused.

merge.yml sets CACHE_VERSION: 1 while verify.yml uses CACHE_VERSION: 2. Additionally, CACHE_VERSION doesn't appear to be referenced anywhere in this workflow's steps. If this variable is vestigial, consider removing it to avoid confusion. If it's intended for future use or consistency, align it with verify.yml.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/merge.yml around lines 6 - 8, The env variable
CACHE_VERSION in merge.yml is inconsistent with verify.yml and appears unused;
either remove CACHE_VERSION from the env block or set it to the same value used
in verify.yml (e.g., change CACHE_VERSION to 2) to maintain consistency; ensure
you only modify the env entry named CACHE_VERSION (leave DEFAULT_PYTHON
untouched) and, if keeping CACHE_VERSION, search other workflows for references
to confirm the chosen value is correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/verify.yml:
- Around line 6-9: The workflow-level env block is missing PREK_HOME which
causes every reference to ${{ env.PREK_HOME }} to be empty; add a PREK_HOME
entry to the same env block (near CACHE_VERSION, DEFAULT_PYTHON, VENV) with the
correct path for the prek cache directory (e.g., set PREK_HOME:
/path/to/prek/cache or the CI-appropriate path), so reusable actions and caches
that reference ${{ env.PREK_HOME }} receive a valid value.

---

Outside diff comments:
In @.github/workflows/verify.yml:
- Around line 114-124: The "Lint markdown files" job uses pre-commit directly
while the "pylint" job uses prek; update the Lint markdown files step to run the
pymarkdown hook via prek for consistency: replace the `pre-commit run
--show-diff-on-failure --color=always --all-files --hook-stage manual
pymarkdown` invocation in the "Lint markdown files" step with the equivalent
`prek run --show-diff-on-failure --color=always --all-files --hook-stage manual
pymarkdown` so both hooks use prek (matching the pylint step).

---

Nitpick comments:
In @.github/workflows/merge.yml:
- Around line 6-8: The env variable CACHE_VERSION in merge.yml is inconsistent
with verify.yml and appears unused; either remove CACHE_VERSION from the env
block or set it to the same value used in verify.yml (e.g., change CACHE_VERSION
to 2) to maintain consistency; ensure you only modify the env entry named
CACHE_VERSION (leave DEFAULT_PYTHON untouched) and, if keeping CACHE_VERSION,
search other workflows for references to confirm the chosen value is correct.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7de86e46-88ae-45ea-81d2-4816ca6900a7

📥 Commits

Reviewing files that changed from the base of the PR and between ca597df and 3367092.

📒 Files selected for processing (9)
  • .github/workflows/merge.yml
  • .github/workflows/verify.yml
  • .markdownlint.yaml
  • .pre-commit-config.yaml
  • .pymarkdown
  • requirements_commit.txt
  • scripts/setup.sh
  • scripts/setup_test.sh
  • scripts/tests_and_coverage.sh
💤 Files with no reviewable changes (1)
  • .markdownlint.yaml

Copy link
Copy Markdown
Contributor

@bouwew bouwew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CoMPaTech great, thanks!

@bouwew bouwew merged commit bcc8d7f into main Mar 27, 2026
17 checks passed
@bouwew bouwew deleted the prek branch March 27, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github-actions Pull requests that update Github_actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants